package com.estore.dao;

import java.util.List;
import javax.sql.DataSource;

import com.estore.entity.Account;
import com.estore.entity.Agent_Profile;
import com.estore.entity.FavoriteProduct;
import com.estore.entity.Role;
import com.estore.entity.User_Profile;
import com.estore.info.ProductInfo;
import com.estore.info.ProfileInfo;

public interface User_Dao {

	public void setDataSource(DataSource datasource);

	// create new user_profile

	public void insertUser_Profile(User_Profile profile);

	// create new account

	public void insertAccount(Account account);

	// get profile after log-in

	public ProfileInfo getUserInfo(Integer UserID);

	// update role user (ban user)
	public void updateRole(Integer userID);

	public void insertRole(Role role);

	public User_Profile getUser_Profile(Integer userID);

	public Account getAccount(String userID, String pass);

	public List<User_Profile> listUser_Profile();

	public void delete(Integer userID);

	public void updateProfile(Integer userID, String lastName,
			String firstName, String email, String dateOfBirth, String sex,
			String address, String phoneNumber);

	public Role getRole(Integer userID);

	public Account getAccount(Integer userID);

	public boolean checkAccountAvail(String account);

	public boolean checkEmailAvail(String email);

	public boolean checkForgetPwd(ProfileInfo info);

	public void changePwd(String account, String pwd);

	public void changeProfile(ProfileInfo info);

	public void changeAvatar(String linkAvatar, String userID);

	public boolean checkSecret(Account acc);
	
	public void changeEmail(String email, String account);
	
	public void addFavoriteProduct(FavoriteProduct info);
	
	public boolean checkFavoriteProduct(Integer productID, Integer userID, Integer type);
	
	public List<FavoriteProduct> getWatchListProduct(Integer userID, Integer type);
	
	// remove favorite product , watch list
	public void removeFavoriteProduct(Integer userID, Integer productID, Integer type);
	
	// get agent profile by user id
	public Agent_Profile getAgentProfile(Integer userID);
	
	// end all list of agent who is banned
	public void endAllList(Integer agentID);
}
